package com.module.wx.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.module.wx.mapper.ZzdCouponNeckStateMapper;
import com.module.wx.domain.ZzdCouponNeckState;
import com.module.wx.service.IZzdCouponNeckStateService;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author hezhengxian
 * @date 2023-03-06
 */
@Service
public class ZzdCouponNeckStateServiceImpl implements IZzdCouponNeckStateService 
{
    @Autowired
    private ZzdCouponNeckStateMapper zzdCouponNeckStateMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public ZzdCouponNeckState selectZzdCouponNeckStateById(String id)
    {
        return zzdCouponNeckStateMapper.selectZzdCouponNeckStateById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param zzdCouponNeckState 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<ZzdCouponNeckState> selectZzdCouponNeckStateList(ZzdCouponNeckState zzdCouponNeckState)
    {
        return zzdCouponNeckStateMapper.selectZzdCouponNeckStateList(zzdCouponNeckState);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param zzdCouponNeckState 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertZzdCouponNeckState(ZzdCouponNeckState zzdCouponNeckState)
    {
        return zzdCouponNeckStateMapper.insertZzdCouponNeckState(zzdCouponNeckState);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param zzdCouponNeckState 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateZzdCouponNeckState(ZzdCouponNeckState zzdCouponNeckState)
    {
        return zzdCouponNeckStateMapper.updateZzdCouponNeckState(zzdCouponNeckState);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteZzdCouponNeckStateByIds(String[] ids)
    {
        return zzdCouponNeckStateMapper.deleteZzdCouponNeckStateByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteZzdCouponNeckStateById(String id)
    {
        return zzdCouponNeckStateMapper.deleteZzdCouponNeckStateById(id);
    }
    /**
     *  查询用户可用优惠券信息
     * @param userId
     * @return
     */
    public List<ZzdCouponNeckState> selectZzdCouponNeckStateByUserId(String userId){
        return zzdCouponNeckStateMapper.selectZzdCouponNeckStateByUserId(userId);
    }

    /**
     *  查询用户所有优惠券信息
     * @param userId
     * @return
     */
    public List<ZzdCouponNeckState> selectAllZzdCouponNeckStateByUserId(String userId){
        return zzdCouponNeckStateMapper.selectAllZzdCouponNeckStateByUserId(userId);
    }
}
